package org.soc.timesheet.domain.repository;
import org.soc.timesheet.domain.Emails;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.roo.addon.layers.repository.jpa.RooJpaRepository;
import org.springframework.stereotype.Repository;

@Repository
@RooJpaRepository(domainType = Emails.class)
public interface EmailsRepository extends JpaRepository<Emails, Integer>, JpaSpecificationExecutor<Emails> {

	@Query("select e from Emails e where e.idUsers.id=?1")
	public Page<Emails> findByIdUsers(int idUser, Pageable pageable);
}
